package week1;

import javax.swing.*;
import java.awt.*;

/**
 * @author The Setting sun
 * @create 2021-09-09 18:19
 */
public class Test {
    public static void main(String[] args) {
        JFrame frame = new JFrame();

        JPanel pu = new JPanel();
        JLabel uLabel = new JLabel(new ImageIcon("樱龙.png"));
        pu.add(uLabel);

        JPanel pc = new JPanel(new GridLayout(2, 1));
        JLabel l1 = new JLabel("账号：");
        l1.setSize(10,10);
        JTextField t1 = new JTextField(12);
        pc.add(l1);
        pc.add(t1);
        JLabel l2 = new JLabel("密码：");
        JTextField t2 = new JTextField(12);
        pc.add(l2);
        pc.add(t2);

        JPanel pd = new JPanel();
        pd.add(new JButton());
        pd.add(new JButton());

        frame.setLayout(new GridLayout(3, 1));
        frame.setVisible(true);
        frame.setSize(650,450);
        frame.setResizable(false);
        frame.setLocationRelativeTo(null);
        frame.setBackground(Color.PINK);

        frame.add(pu);
        frame.add(pc);
        frame.add(pd);
    }
}
